feat(parser): add dataset and data-source parsing support#29
Merged
LostRhapsody merged 7 commits intomasterfrom Apr 10, 2026
Merged
feat(parser): add dataset and data-source parsing support#29LostRhapsody merged 7 commits intomasterfrom
LostRhapsody merged 7 commits intomasterfrom
Conversation
Add ~20 new lexer keywords for dataset/data-source parsing. Add XmlSerializeOptions, DefineDataset, DefineDataSource, DataRelation, ParentIdRelation, DataSourceBuffer, DataSourceKeys types. Restructure Statement::Create with CreateTarget enum. Restructure Statement::DefineParameter with ParameterType enum. Add xml_options field to DefineTempTable and DefineBuffer.
Implement parse_define_dataset() with DATA-RELATION, PARENT-ID-RELATION, RELATION-FIELDS, all flags (REPOSITION, NESTED, FOREIGN-KEY-HIDDEN, NOT-ACTIVE, RECURSIVE), REFERENCE-ONLY, and XML/serialize options. Implement parse_define_data_source() with QUERY and KEYS clauses. Extract parse_xml_serialize_options() helper and retrofit on parse_define_temp_table() and parse_define_buffer(). Restructure parse_create_statement() with CreateTarget dispatch for DATASET, DATA-SOURCE, and TEMP-TABLE with IN WIDGET-POOL. Extend parse_define_parameter() with TABLE, TABLE-HANDLE, DATASET, DATASET-HANDLE, and BUFFER parameter types. Add NEW SHARED/SHARED and SERIALIZABLE/NON-SERIALIZABLE modifier parsing in parse_define_statement() dispatch.
Add 28 new tests covering DEFINE DATASET (all clauses), DEFINE DATA-SOURCE (QUERY, KEYS, ROWID), CREATE typed variants (DATASET, DATA-SOURCE, TEMP-TABLE, Name), DEFINE PARAMETER extensions (TABLE, TABLE-HANDLE, DATASET, DATASET-HANDLE, BUFFER, BIND/APPEND), and XML/serialize option retrofit on DEFINE TEMP-TABLE and DEFINE BUFFER. Fix hyphenated keyword matching for DATA-RELATION, DATA-SOURCE, and DATASET-HANDLE — the HTML keyword index uses space-separated forms but ABL source uses hyphens.
Add bench_parser_datasets.abl with diverse dataset/data-source definitions for CodSpeed regression detection. Register in parser_bench.rs. Apply cargo fmt across all changed files.
Contributor
Adding Kind::Nested and other dataset keywords caused them to no longer be recognized as valid identifiers in member access, method call, and other identifier positions. Add all new unreserved keywords to can_be_identifier() to fix chained member access parsing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing
bench_parser_datasets.abl) for CodSpeed regression detectioncargo clippy -D warningspassescargo fmt --checkpassesPost-Deploy Monitoring & Validation
No additional operational monitoring required: this is a parser library with no runtime deployment.